<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<title>v-text_html</title>
	</head>
	<body>
		
		<div id="app">
			姓名:{{fullName}}
		</div>
	</body>
	<script>
		var app = new Vue({
			el: '#app',
			data: {
				firstName: "陈",
				lastName: "耀",

			},
			computed: {
				fullName: {
					get: function() {
						return this.firstName + "," + this.lastName;
					},
					set: function(newValue) {
						var name = newValue.split(",");
						this.firstName = name[0];
						this.lastName = name[name.length - 1];
						console.log(this.firstName + " " + this.lastName)
					}
				}
			}
		})
	</script>
</html>
